<template>
    <div>
        <Card :bordered="false" dis-hover class="ivu-mt">
            <!-- 自定义筛选项 start  -->
            <table-form @on-submit="getData" @on-reset="getData" />
            <!-- 自定义筛选项 end  -->
            <!-- 调用表格子组件 start  -->
            <table-list ref="table" />
            <!-- 调用表格子组件 end  -->
        </Card>
    </div>
</template>
<script>
    import tableForm from './dynamicCompForm'; // 表单组件
    import tableList from './dynamicCompTable'; // 表格组件

    export default {
        components: {
            tableForm,
            tableList
        },
        mounted () {
            this.getData();
        },
        methods: {
            // 获取表格数据
            getData (formData) {
                this.$refs.table.getData(formData);
            }
        }
    }
</script>
